﻿@model IEnumerable<Website.Models.JobsModel>
@{
    ViewBag.Title = "首页";
}

<h2>最新招聘信息</h2>
<p>
    <table cellspacing="0" border="1">
        <thead>
            <tr style="font-weight:bold;">
                <td style="width:120px;">日期</td>
                <td style="width:300px;">职位名称</td>
                <td style="width:200px;">招聘单位</td>
                <td></td>
            </tr>
        </thead>
        <tbody>
            @{
                foreach (Website.Models.JobsModel job in Model)
                { 
            <tr>
                <td>@job.Date.ToShortDateString()</td>
                <td>@job.Position</td>
                <td>@job.Company</td>
                @{
                    if(Request.IsAuthenticated)
                    {
                        <td>@Html.ActionLink("申请", "Index", "Home")</td>
                    }
                    else
                    {
                        <td></td>
                    }
                }
            </tr>
                }
            }
        </tbody>
    </table>
</p>
